feat: corpus-back Handle, Background, Controls, MiniMap, useReactFlow#83
Merged
KailasMahavarkar merged 5 commits intomainfrom Apr 21, 2026
Merged
feat: corpus-back Handle, Background, Controls, MiniMap, useReactFlow#83KailasMahavarkar merged 5 commits intomainfrom
KailasMahavarkar merged 5 commits intomainfrom
Conversation
Refactors the reactflow get-api corpus loader from a hardcoded ReactFlow-only lookup to a generic per-API lookup keyed by normalized API name. The loader now reads `apis[<name>].file` from the namespace index, caches per-API, and supports arbitrary API slices without further code changes. Adds corpus/frontend/reactflow/handle.yaml with the Handle component contract (props, usage, multi-handle example, tips). Test asserts corpus source for Handle; fallback check moves to Background. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds corpus/frontend/reactflow/background.yaml with Background component contract (variants, gap, size, cross pattern example). Registers background in namespace index. Test asserts corpus source for Background; fallback check moves to Controls. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds corpus/frontend/reactflow/controls.yaml with the viewport controls panel contract and custom ControlButton example. Registers controls in namespace index. Test asserts corpus source for Controls; fallback check moves to MiniMap. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds corpus/frontend/reactflow/minimap.yaml with the minimap overview component contract and pannable/zoomable usage. Registers minimap in namespace index. Test asserts corpus source for MiniMap; fallback check moves to useReactFlow. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds corpus/frontend/reactflow/usereactflow.yaml with the ReactFlowInstance hook contract, destructure example, addNodes/deleteElements examples, and non-reactivity tips. Registers usereactflow in namespace index. Test asserts corpus source for useReactFlow; fallback check moves to NodeResizer. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
src/plugins/reactflow/tools/get-api.tscorpus loader from a hardcodedReactFlow-only lookup to a generic per-API lookup keyed by normalized API name. New slices can be added by dropping YAML intocorpus/frontend/reactflow/and registering in the namespace indexcorpus/frontend/reactflow/index.yamltests/reactflow-corpus-backed-tools-behaviour.test.tsasserts Corpus Source: frontend.reactflow for each new slice; fallback check rotates to the next un-migrated API (NodeResizer)Test plan